Skip to content

chore(deps): bump redb from 4.4.0 to 5.0.0 - #365

Merged
hyperpolymath merged 3 commits into
mainfrom
dependabot/cargo/redb-5.0.0
Dec 4, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
dependabot/cargo/redb-5.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 28, 2026

Copy link
Copy Markdown
Contributor

Bumps redb from 4.4.0 to 5.0.0.

Release notes

Sourced from redb's releases.

5.0.0

Breaking changes

The encoding of Option<&str>, Option<String>, Option<bool>, and Option<char> has been changed to optimize the storage of these types. The new encoding is not compatible with the one used in prior versions. Tables that contain these Option types, and were created prior to version 5.0, will fail to open with TableTypeMismatch. To load them, wrap the inner type in the new Legacy type. For example, TableDefinition<u64, Option<&str>> becomes TableDefinition<u64, Option<Legacy<&str>>>. This also applies to an Option that is nested inside another type, such as a tuple. The recommended pattern to migrate is to create a new table, and then copy the data from the old table to the new table.

Important: If you have implemented Value for your own type, and its encoding uses Option<&str>, Option<String>, Option<bool>, or Option<char> (including inside a Vec, array, or tuple), redb cannot detect the change and will silently misread existing tables. Change the implementation to use Option<Legacy<T>> to read existing tables, and use a new TypeName for the new encoding.

A number of other APIs have changed in breaking ways:

  • Remove the inherent get() and range() methods of ReadOnlyTable and ReadOnlyMultimapTable. They returned 'static guards and iterators, which did not keep the transaction alive. Use the methods on ReadableTable and ReadableMultimapTable instead, or get_owned() and range_owned() if the result must outlive the table.
  • Change Range and MultimapRange to borrow the table until they are dropped. Mutating a table while a range over it is still in scope could panic, and is now a compile error.
  • Change Entry, OccupiedEntry, and VacantEntry to take a second lifetime, for the key, which no longer needs to live as long as the borrow of the table.
  • Change FileBackend::new() to return FileBackend instead of a Result.
  • Change ReadableTable::lower_bound() and ReadableTable::upper_bound() to be required methods.
  • Change ReadableDatabase to be a sealed trait.
  • Remove Table::extract_from_if(). Use extract_if() instead.
  • Change Table::extract_if() to take a range as its first argument, like BTreeMap::extract_if(). Use extract_if(.., predicate) to visit the whole table.
  • Remove Builder::create_file(). Use Builder::create_with_backend(FileBackend::new(file)) instead.
  • Remove WriteTransaction::print_allocated_page_debug().
  • Remove From<PoisonError<T>> for StorageError and Error.
  • Change range(), range_owned(), retain_in(), and extract_if() to take a KeyRange instead of a RangeBounds. The key type no longer needs to be specified. For example, table.range::<u64>(..) becomes table.range(..).
  • Change the I/O methods of StorageBackend to return BackendError instead of io::Error. An io::Error can still be converted with ?. Note that an io::Error of kind Unsupported is now converted to BackendError::Io instead of BackendError::Unsupported. Lock methods may return either to indicate that locking is not supported.
  • Change the TableTypeMismatch and TypeDefinitionChanged variants of TableError and Error to contain a Box. Their fields are replaced by methods on the new TableTypeMismatch and TypeDefinitionInfo structs.
  • Change Database::compact() to take a CompactionMode, which selects how thoroughly to compact. Use compact(CompactionMode::Balanced) to compact as before.
  • Remove the chrono_v0_4 feature, because the chrono crate is no longer maintained. To read existing tables of its types, implement Value and Key for a type of your own with the same TypeName and encoding.

... (truncated)

Changelog

Sourced from redb's changelog.

5.0.0 - 2026-11-18

Breaking changes

The encoding of Option<&str>, Option<String>, Option<bool>, and Option<char> has been changed to optimize the storage of these types. The new encoding is not compatible with the one used in prior versions. Tables that contain these Option types, and were created prior to version 5.0, will fail to open with TableTypeMismatch. To load them, wrap the inner type in the new Legacy type. For example, TableDefinition<u64, Option<&str>> becomes TableDefinition<u64, Option<Legacy<&str>>>. This also applies to an Option that is nested inside another type, such as a tuple. The recommended pattern to migrate is to create a new table, and then copy the data from the old table to the new table.

Important: If you have implemented Value for your own type, and its encoding uses Option<&str>, Option<String>, Option<bool>, or Option<char> (including inside a Vec, array, or tuple), redb cannot detect the change and will silently misread existing tables. Change the implementation to use Option<Legacy<T>> to read existing tables, and use a new TypeName for the new encoding.

A number of other APIs have changed in breaking ways:

  • Remove the inherent get() and range() methods of ReadOnlyTable and ReadOnlyMultimapTable. They returned 'static guards and iterators, which did not keep the transaction alive. Use the methods on ReadableTable and ReadableMultimapTable instead, or get_owned() and range_owned() if the result must outlive the table.
  • Change Range and MultimapRange to borrow the table until they are dropped. Mutating a table while a range over it is still in scope could panic, and is now a compile error.
  • Change Entry, OccupiedEntry, and VacantEntry to take a second lifetime, for the key, which no longer needs to live as long as the borrow of the table.
  • Change FileBackend::new() to return FileBackend instead of a Result.
  • Change ReadableTable::lower_bound() and ReadableTable::upper_bound() to be required methods.
  • Change ReadableDatabase to be a sealed trait.
  • Remove Table::extract_from_if(). Use extract_if() instead.
  • Change Table::extract_if() to take a range as its first argument, like BTreeMap::extract_if(). Use extract_if(.., predicate) to visit the whole table.
  • Remove Builder::create_file(). Use Builder::create_with_backend(FileBackend::new(file)) instead.
  • Remove WriteTransaction::print_allocated_page_debug().
  • Remove From<PoisonError<T>> for StorageError and Error.
  • Change range(), range_owned(), retain_in(), and extract_if() to take a KeyRange instead of a RangeBounds. The key type no longer needs to be specified. For example, table.range::<u64>(..) becomes table.range(..).
  • Change the I/O methods of StorageBackend to return BackendError instead of io::Error. An io::Error can still be converted with ?. Note that an io::Error of kind Unsupported is now converted to BackendError::Io instead of BackendError::Unsupported. Lock methods may return either to indicate that locking is not supported.
  • Change the TableTypeMismatch and TypeDefinitionChanged variants of TableError and Error to contain a Box. Their fields are replaced by methods on the new TableTypeMismatch and TypeDefinitionInfo structs.
  • Change Database::compact() to take a CompactionMode, which selects how thoroughly to compact. Use compact(CompactionMode::Balanced) to compact as before.
  • Remove the chrono_v0_4 feature, because the chrono crate is no longer maintained. To read existing tables of its types, implement Value and Key for a type of your own with the same TypeName and encoding.

... (truncated)

Commits
  • 0d53424 Bump version to 5.0.0
  • f9fb0c1 Update changelog
  • 0a5d3ec Update changelog
  • 2d5fed3 Leave a branch with one child as it is in CompactionMode::Maximum
  • 71606ce Pack multimap subtrees in CompactionMode::Maximum
  • 402980e Merge the branches of each table in CompactionMode::Maximum
  • 765dfba Pack the leaves of each table in CompactionMode::Maximum
  • 460a866 Add CompactionMode::Maximum, without packing yet
  • b3e8ab8 Remove the chrono_v0_4 feature
  • d0ec1c4 Make compact() take a CompactionMode
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [redb](https://github.com/cberner/redb) from 4.4.0 to 5.0.0.
- [Release notes](https://github.com/cberner/redb/releases)
- [Changelog](https://github.com/cberner/redb/blob/master/CHANGELOG.md)
- [Commits](cberner/redb@v4.4.0...v5.0.0)

---
updated-dependencies:
- dependency-name: redb
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Nov 28, 2026
@gitnotebooks

gitnotebooks Bot commented Nov 28, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hyperpolymath
hyperpolymath merged commit ddd29eb into main Dec 4, 2026
60 of 62 checks passed
@hyperpolymath
hyperpolymath deleted the dependabot/cargo/redb-5.0.0 branch December 4, 2026 07:02
@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant